//
// Created by Jisam on 05/10/2024 20:06.
// Solution of  a
#include <bits/stdc++.h>

#define  int long long
#define  endl "\n"
using namespace std;


signed main() {
    cin.tie(nullptr)->sync_with_stdio(false);
    string s;
    cin >> s;
    int n = s.size();
    if(s[n - 1] == 'n' &&s[n - 2] == 'a' &&s[n - 3] == 's'){
               cout << "Yes";

    }else{
        cout << "No";
    }
    cout << endl;

    return 0;
}